/******************************************************************************
**                                                                           **
**                 Proprietary and Confidential Information                  **
**                                                                           **
**                 Copyright (c) Conexant, Inc. Unpublished                  **
**                                                                           **
** This source code and the algorithms implemented therein constitute        **
** confidential information and may compromise trade secrets of SigmaTel,    **
** Inc. or its associates, and any unauthorized use thereof is prohibited.   **
**                                                                           **
******************************************************************************/
#ifndef __DC_VOREGISTER_API_H__
#define __DC_VOREGISTER_API_H__


/**************************************************************************
 * file: dc_vo_register_api.h
 *       This file include defination of VO module control parts
 *   
******************************************************************************
*  FILE FORMAT:
*      1. ENUMERATIONS 
*      2. DEFINES
*      3. STRUCTURES
*      4. ALLOCS
*      5. FUNCTIONS
******************************************************************************/
/******************************************************************************
*  1. ENUMERATIONS 
******************************************************************************/
// output pixle format
typedef enum{
	raw  =  0x00,
	index1bpp = 0x0d,
	index2bpp = 0x0e,
	index4bpp = 0x01,
	grayscale8bpp = 0x02,
	RGB322_8bpp = 0x0f,
	index8bppOverlay = 0x03,
	index16bppOverlayRGB = 0x04,
	RGB565_16bpp = 0x05,
	indexRGB4444_16bppOverlay = 0x06,
	RGB4444_16bppNull = 0x07,
	indexRGB8888_32bppOverlay = 0x08,
	RGB8888_32bppNull = 0x09,
}DC_VO_REGISTER_PIXEL_FORMAT_t;

typedef enum{
  DC_VO_REGISTER_FRAMEBUFFER_A = 0x00,
  DC_VO_REGISTER_FRAMEBUFFER_B = 0x01,
}DC_VO_REGISTER_BUFFER_TYPE_t;

typedef enum{
  DC_VO_REGISTER_LOCAL_RESET= 0x01,
  DC_VO_REGISTER_LOCAL_NORMAL = 0x02,
  DC_VO_REGISTER_PAGE_RESET  = 0x04,
  DC_VO_REGISTER_PAGE_NOTMAL = 0x08
}DC_VO_REGISTER_RESET_TYPE_t;

/******************************************************************************
*  3. STRUCTURES 
******************************************************************************/

// setting for other config register
typedef struct{
  UINT8 a;
}DC_VO_REGISTER_CLOCK_t;



typedef struct{
  UINT8 a;
}DC_VO_REGISTER_TIMING_t;
// settig for each display 
typedef struct {
  UINT32 VBlankTop;   // 
  UINT32 VBlankBottom;   // 
  UINT32 HBlankLeft;    //
  UINT32 HBlankRight;   //
  UINT32 VActive;         // 
  UINT32 HActive;       // 
}DC_VO_REGISTER_PANEL_CONFIG_t;

// setting for initial config of VO registers
typedef struct {
  DC_VO_REGISTER_PANEL_CONFIG_t  panelCfg;
  DC_VO_REGISTER_CLOCK_t clkCfg;
  DC_VO_REGISTER_TIMING_t timeCfg;
  
}DC_VO_REGISTER_INIT_CONFIG_t;


// frme buffer config used for real time
typedef struct{
  UINT32                  base;
  UINT32                  stride;
}DC_VO_REGISTER_FRAMEBUFFER_t;


/******************************************************************************
*  5. FUNCTIONS
******************************************************************************/
DC_RETURN_CODE dc_vo_register_initial_setup(DC_VO_REGISTER_INIT_CONFIG_t *pCfgParams);
DC_RETURN_CODE dc_vo_register_displaypage_setup(DC_VO_REGISTER_BUFFER_TYPE_t bufType, DC_VO_REGISTER_FRAMEBUFFER_t *pFrameBuf);
DC_RETURN_CODE dc_vo_register_displaydimention_check(UINT32 width, UINT32 height);
DC_RETURN_CODE dc_vo_register_buffer_switch(void);
DC_RETURN_CODE dc_vo_register_buffer_switch1(UINT32 bufType);
DC_RETURN_CODE dc_vo_register_buffer_interrupt(boolean enable);
DC_RETURN_CODE dc_vo_register_reset(DC_VO_REGISTER_RESET_TYPE_t);
DC_RETURN_CODE dc_vo_register_buffer_memory_set(DC_VO_REGISTER_BUFFER_TYPE_t bufType, UINT32 stride, UINT32 base);
DC_RETURN_CODE dc_vo_register_buffer_enable(void);
#endif //__DC_VOREGISTER_API_H__

